/*---------------------------------------------------------------------------
  Copyright 2012 Microsoft Corporation.
 
  This is free software; you can redistribute it and/or modify it under the
  terms of the Apache License, Version 2.0. A copy of the License can be
  found in the file "license.txt" at the root of this distribution.
---------------------------------------------------------------------------*/

/* Text size and margins for screen & print */
@media screen {
  body { 
    padding: 1em 8% 1em 8%;
    padding-bottom: 50em; /* so a link to the end always puts the definition on top of the screen */
  }
}

@media print {
  body {
    font-size: 9pt;
    margin: 0pt;
  }
  h2,h3,h4 { 
    page-break-after: avoid; 
  }  
  p { 
    text-align: justify;
  }
  @page:left  { margin: 8% 5% 8% 5%; }
  @page:right { margin: 8% 5% 8% 5%; }
}
/* p,li,div.koka.doc.comment { text-align: justify;} */


/* source code font styles: 
   font stack designed for windows, mac, and linux.
   see also: http://www.apaddedcell.com/sites/www.apaddedcell.com/files/fonts-article/final/index.html
*/
body {
  -webkit-text-size-adjust: 100%; /* so math displays well on mobile devices */  
  color: black;
}

body,
.koka .comment,
.sans-serif { 
  font-family: 'Segoe UI', 'PT Sans', 'Candara', 'DejaVu Sans', sans-serif;
}

.serif {
  font-family: Cambria,"Times New Roman","Liberation Serif","Times",serif;
}

h1 { 
  font-size: 175%; 
}

.sans-section { 
  font-family: 'Century Gothic', 'Apple Gothic', 'Optima', 'URW Gothic L',  sans-serif; 
}

/* Fix monospace display (see http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/) */
body.koka.doc,
.koka .mo, .koka .module,
.koka.source,
.koka.code, code,
.koka.codeblock,
.koka.pre, pre,
.koka.preblock, 
.monospace { 
  font-family: Consolas,"Andale Mono WT","Andale Mono",Lucida Console,Monaco,monospace,monospace;
}

.koka.code, code {
  font-size: 0.9em;
} 

.koka pre code,
.koka.pre, 
.koka.preblock,
.koka.codeblock {
  font-size: 0.95em;
}


/* source code blocks */
.koka.codeblock,
.koka.preblock,
.koka.source  { 
  background: #F8F8F8;  
  border: 1px solid #DDD;   /* dark grey */
  padding: 0.5ex 1ex 0.5ex 1ex;
  margin: 1ex 5% 1ex 0ex;
}

.koka.source.unchecked {
  border: 1px dotted #DDD;
}

.koka.source-body .source {
  margin-right: 1ex;
}

.koka.code, code,
.koka.pre, pre { 
  padding: 0px 3px 0px 3px;
}

.koka .dash { 
  margin-left: -0.25ex; margin-right: -0.25ex
}

.koka .minus {
  font-weight: bold;
}

.koka .fslash {
  font-size: 90%;  
}
.koka .fslash .last {
  margin-right: 0.5ex;
}

.koka .postfix { 
  color: gray 
}


/* Pre */
.koka.source,
.koka.codeblock,
.koka.preblock,
.koka.code, code,
.koka.pre, pre { 
  white-space: pre-wrap 
}

.koka.doc .comment p {
  margin: 0pt;
  margin-bottom: 0.5ex;
}

/* Used for online tutorials */
.plaincode  { 
  display: none;
  white-space: pre-wrap;
}

.koka.source a:hover,
.koka.code a:hover, code.koka a:hover
.koka.pre a:hover, pre.koka a:hover { 
  text-decoration: none 
}


/* standard tokens */
.koka .type, .koka .tp          { color: teal }
.koka .keyword, .koka .kw       { color: blue }     
.koka .string, .koka .st        { color: maroon }
.koka .module, .koka .mo        { color: navy }
.koka .number, .koka .nu        { color: black }
.koka .constructor, .koka .co   {  color: purple }
.koka .namespace, .koka .mo     { color: navy }
.koka .comment                  { color: green }


/* These are perhaps too fancy ? */
.koka .type.typeparam, .koka .tp.tpp { color: #555 }
.koka .type.typevar, .koka .tp.tv    { font-style: italic }
.koka .type.keyword.operator, .koka .tp.kw.op { color: teal }

/* comment formats */
.koka.emph {
  font-style: italic;
  color: black;
}

.koka.preblock,     
.koka.codeblock
      { display: block 
      ; margin-top: 1ex
      ; margin-bottom: 1ex
      }
      
.koka.line
      { display: block
      ; border-bottom: 1px dotted
      ; margin-top: 3px
      ; width: 75%
      }


/* addornments */
.koka .error, 
.koka .warning { 
  border-bottom: dotted;
  border-width: 2px;
}

.koka .error    { border-color: red }
.koka .warning  { border-color: teal }

/* declarations */
.koka .decl.type,
.koka .decl.cotype,
.koka .decl.rectype,
.koka .decl.fun,
.koka .decl.val,
.koka .decl.external { 
  /* background-color: yellow */
}

.koka .decl.alias,
.koka .decl.alias .koka .keywordop { 
  color: teal 
}

/* popup boxes: for space we call this pp (for popup) and pc (for popup-content) */
a.pp    { 
  position: relative;
  text-decoration: none;
  color: black;
}

.pc { 
  display: none;
}

a.pp:hover  { 
  z-index: 100;
  text-decoration: none;
}

a.pp:hover .pc, .tooltip { 
  display:block;
  position:absolute;
  top:1.5em;
  left:2ex;
  padding: 0.2ex 0.75ex 0.2ex 0.5ex;
  border:1px solid black;
  background: #FFFFE8;   
  white-space: pre;
}

a.pp a.pp:hover .pc
  { top: 3em }



/* Documentation */
h1.koka.module
      { font-weight: normal
      }

.koka .toc-link 
      { font-size: 12pt
      ; float: right
      ; color: navy
      }

.koka.doc .header
      { background: #F8F8F8     /* light grey */
      ; padding: 1px
      ; padding-left: 0.5ex
      ; margin-top: 0px
      ; margin-bottom: 0.5em
      }

.koka.doc .link 
      { text-decoration: none
      ; color: black
      }

.koka.doc .doc.comment
      { color: black;
      }

.koka.doc .decl .decl
      { margin-left: 1em 
      }

.koka.doc .decl .comment
      { margin: 0em 0em 0em 1em }

.koka.doc.body>.comment
      { margin-bottom: 2em }

.koka.doc .decl, 
.koka.doc .con-decl
      { margin-top: 1em
      ; border: 1px solid #DDD
      ; border-width: 1px 0px 0px 1px
      }
  
/*
.koka.doc.header,
.koka.doc.decl,
.koka.doc.con-decl { 
  border-top-left-radius: 8px
}
*/

div.nested { 
  margin: 1.25em 0em 1.25em 1em 
}

.koka.doc .nested .decl
      { margin-left: 0em }  

.koka.doc .con-decl
      { /* border: dotted 1px */
      ; margin-left: 1em
      ; margin-top: 0.5em
      ; margin-bottom: 0.5em
      }

/* gives more weight to definition entries */
/*
.koka.doc .def a {
  font-weight: bold;
}
*/


/* Table of contents */

.koka.doc ul.toc 
      { list-style-type: none
      ; margin: 0em
      ; float: left;
      ; clear: none;
      ; margin-bottom: 1.5em; 
      ; padding: 0.5ex 1.5ex 0ex 0.5ex;
      /* ; width: 10.5em; */
      ; white-space: nowrap
      }

.koka.doc ul.toc li.nested
      { padding-left: 1em
      }

.koka.doc div.toc 
      { overflow: auto
      ; width: 100%
      }

/* Index documentation */
.koka.doc table.index td {
  vertical-align: top;
  padding-right: 1em;
  padding-bottom: 0.5ex;
}

.koka.doc table.index .nested1 {
  margin-left: 1.25ex;
}

.koka.doc table.index .nested2 {
  margin-left: 2.5ex;
}

.koka.doc table.index .nested3 {
  margin-left: 3.75ex;
}

/* Print in black&white. Commented out for now  */
/*
@media print {
  .koka .keyword, .koka .kw       { font-weight: bold; color: black; }      
  .koka .string, .koka .st        { color: gray }
  .koka .module, .koka .mo        { color: gray }
  .koka .number, .koka .nu        { color: black }
  .koka .constructor, .koka .co   { color: black }
  .koka .type, .koka .tp          { color: gray }
  .koka .namespace, .koka .mo     { color: gray }
  .koka .comment                  { color: black }

  .koka .type.typeparam, .koka .tp.tpp { color: #555 } 
  .koka .type.typevar, .koka .tp.tv    { font-style: italic }
  .koka .type.keyword.operator, .koka .tp.kw.op { color: gray } 
}
*/
